Docker: A Better Way for Dependencies

What I want to talk about

  • What is Docker
  • What it gives you as a developer
  • And a Demo

What is Docker

The complicated part!

A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings.

![Docker Visulisation](https://i.imgur.com/njoGZ28.png =500x)

Why you should Care

Docker

  • Don't need to install anything on your machine
  • Can use conflicting versions
  • No Clean Up
  • Simple Script to build custom images

Docker Compose

  • Scriptable Enviroments
    • Easily shared
    • Easily changed
  • Simple commands

Demo

Docker Command

docker run -it --rm --name redbrick\
SECRET_API_TOKEN='somethingThatMustChange'\
RECAPTCHA_SITE_KEY='redbrickIsGreat'\
RECAPTCHA_SECRET_KEY='totalySecretKey'\
LOG_ROTATE='24h'\
-p 3000:3000 redbrick/site

Docker Compose

version: '3'
services:
  redbrick:
    image: 'redbrick/site:latest'
    restart: 'always'
    ports:
      - '3000:3000'
    environment:
      SECRET_API_TOKEN: 'somethingThatMustChange'
      RECAPTCHA_SITE_KEY: 'redbrickIsGreat'
      RECAPTCHA_SECRET_KEY: 'totalySecretKey'
      LOG_ROTATE: '24h'

Try it live?

Further Reading

Questions?

![End with a cat](https://i.imgur.com/ysOewyR.jpg =250x)